package com.zozo.guanli.service.peijian;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.zozo.guanli.dao.BaseDao;
import com.zozo.guanli.dao.peijian.PeijianDao;
import com.zozo.guanli.util.Page;
import com.zozo.guanli.vo.Accessory;

@Service
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public class PeijianService {

    @Autowired
    private PeijianDao peijianDao;

    /**
     * 
     */
    public void save(Accessory entity) {
        peijianDao.save(entity);
    }

    public List<Accessory> findAll() {
        return (List<Accessory>) peijianDao.findAll(Accessory.class);
    }

    public void delete(Accessory entity) {
        peijianDao.delete(entity);
    }

    public Accessory get(Long id) {
        return (Accessory) peijianDao.findById(Accessory.class, id);
    }

    public Page<Accessory> findByPage(Page<Accessory> page, String condition) {
        return peijianDao.findByPage(page, condition);
    }

}
